<template>
  <section>
    <transition>
      <router-view v-if="Part.PartA" @back="Monitor" :Part="Part"></router-view>
    </transition>
    <div v-if="Part.PartB">
      <el-row justify="space-between" type="flex">
        <el-form :inline="true">
          <el-form-item label="逻辑班号">
            <el-select size="small">
              <el-option></el-option>
            </el-select>
          </el-form-item>
        </el-form>
        <el-form :inline="true">
          <el-form-item>
            <el-button size="small" type="primary" @click="handAdd">添加学生</el-button>
          </el-form-item>
        </el-form>
      </el-row>
      <el-table :data="tableData" stripe>
        <el-table-column label="序号" type="index"></el-table-column>
        <el-table-column label="名称"></el-table-column>
        <el-table-column label="人数"></el-table-column>
        <el-table-column label="操作">
          <template slot-scope="scope">
            <el-button size="mini" type="primary" @click="handCheck(scope.$index,scope.row)">查 看</el-button>
            <el-button size="mini" type="danger">删 除</el-button>
            <el-button size="mini" type="info" @click="CheckClass(scope.$index,scope.row)">考试科目统计</el-button>
          </template>
        </el-table-column>
      </el-table>
      <!-- 考试科目统计页面 -->
      <el-dialog title="考试科目统计页面" :visible.sync="CheckForm">
         <el-table :data="tableList" stripe>
           <el-table-column type="index" label="序号"></el-table-column>
           <el-table-column label="科目"></el-table-column>
           <el-table-column label="时间限制"></el-table-column>
           <el-table-column label="操作">
             <template slot-scope="scope">
               <el-button type="primary" size="mini">知识点统计</el-button>
             </template>
           </el-table-column>
         </el-table>
      </el-dialog>
    </div>
  </section>
</template>
<script>
export default {
    data() {
        return {
          Part:{
            PartA:false,
            PartB:true
          },
          CheckForm:false,
            tableData: [{}],
            tableList:[{}]
        };
    },
    methods: {
      Monitor: function(Part) {
            this.Part.PartA = false;
            this.Part.PartB = true;
        },
        handAdd() {
            this.addForm = true;
        },
        handCheck(index, row) {
            this.Part.PartA = true;
            this.Part.PartB = false;
           this.$router.push({ path: "/Teacher/Student/CheckStudent" });
        },
        CheckClass(){
          this.CheckForm = true;
        }
    }
};
</script>
